package com.example.yaja.yaja.service;

import com.example.yaja.yaja.dao.ActivityMapper;
import com.example.yaja.yaja.entity.Activity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Zero on 2017/12/4.
 */
@Service("activityService")
public class ActivityServiceImpl implements ActivityService {

    @Autowired
    ActivityMapper activityMapper;

    /**
     * 查询几条活动信息
     * @param number
     * @return
     */
    @Override
    public List<Activity> findActivityByNumber(Integer number){
        return activityMapper.selectActivityByNumber(number);
    }


    /**
     * 查询所有活动
     * @return
     */
    @Override
    public List<Activity> findAllActivity() {
        return activityMapper.selectAllActivity();
    }
}
